#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

int main()
{
    pid_t pid;

    printf("开始的pid：%d\n",getpid());
    if((pid = fork())==-1)perror("fork"),exit(1);
    printf("结果：%d   返回值：%d\n",getpid(),pid);
    sleep(1);
    return 0;
}
